﻿@{
    ViewData["Title"] = "SurveyView";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<!DOCTYPE html>
<h1>汉庭酒店</h1>
<div class="layui-panel">
    <div style="padding: 32px;">
        <h4>数据概况 </h4>
        <div id="current-time"></div>
        <br>

        <table class="layui-table" lay-skin="nob">
            <colgroup>
                <col width="150">
                <col width="150">
                <col>
            </colgroup>

            <tbody>
                <tr>
                    <td> <span style="color: blue;">0</span></td>
                    <td> <span style="color: blue;">0</span></td>
                    <td> <span style="color: blue;">0</span></td>
                    <td> <span style="color: blue;">0</span></td>
                </tr>
                <tr>
                    <td>今日在线预订</td>
                    <td>今日预计入住</td>
                    <td>今日新入住</td>
                    <td>今日新顾客数</td>
                </tr>
            </tbody>
        </table>

    </div>
</div>

<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        var currentTimeDiv = document.getElementById('current-time');

        // 初始化并显示时间
        updateTime();

        // 使用 setInterval 每隔 1 秒（1000 毫秒）更新一次时间
        setInterval(updateTime, 1000);

        function updateTime() {
            laydate.render({
                elem: '#current-time',
                format: 'yyyy-MM-dd HH:mm:ss',
                value: new Date()
            });
        }
    });
</script>


